#ifndef CONTIG_H
#define CONTIG_H

#include <QObject>
#include <QPainter>
#include <QBrush>
#include <QRectF>
#include <QColor>

#include "../../VisBaseClasses/visbasecontainer.h"
#include "multigeneregionviswidget.h"
#include "../../sagevis.h"
#include "BaseDataManagement/contigdatapacket.h"
#include "genomeelement.h"

class GenomeElement;
class VisBaseContainer;
class VisBaseElement;
class SageVis;
class ContigDataPacket;

class Contig : public VisBaseContainer
{
    Q_OBJECT
public:
    explicit Contig(QPointer<SageVis> sageVisPointer, MultiGeneRegionVisWidget* parentWidget, QGraphicsItem *parent = 0);
    explicit Contig(QPointer<ContigDataPacket> dataPacket, QPointer<SageVis> sageVisPointer, MultiGeneRegionVisWidget* parentWidget, QGraphicsItem *parent = 0);

    typedef VisBaseContainer super;

    void setDataPacket( QPointer<ContigDataPacket> dataPacket );
    void addGenomeElement( GenomeElement* genomeElement );

    //SHAPE AND SIZE FUNCTIONS
//    void setGeometry(const QRectF &geom);
//    QRectF boundingRect() const;
//    QPainterPath shape() const;
//    QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;

    //PAINT FUNCTIONS
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

    
signals:
    
public slots:
    
protected:
    QPointer< ContigDataPacket > dataPacket;
    QList< QPointer<GenomeElement> > genomeElements;


    //FUNCTIONS
    void init();

    void processHoverEvent(QGraphicsSceneHoverEvent *event);//for when this object is hovered over
    void receiveHoverEvent(QGraphicsSceneHoverEvent *event); //for when another connected object is hovered over

};

#endif // CONTIG_H
